package com.aldobucchi.x.flash.system.gc
{
	import com.aldobucchi.utils.AbstractTest;

	public class GCUtilTest extends AbstractTest
	{
		
		
		
		public function test_gcMapValues( ):void
		{
		

				var map1:Object = { };
				var map2:Object = { };
				
				for ( var i:int=0; i<10; i++ )
				{
					var o:Object = { i:i };
					
					map1[ i ] = o;				
					map2[ i ] = o;
				
				}
				
				
				var report:Array;
				
				
				report = GCUtil.gcMapValues( map1 );
				
				assertEquals( report[0], 10 );
				assertEquals( report[1], 10 );

				delete map2[ 2 ];
				delete map2[ 3 ];
				
				report = GCUtil.gcMapValues( map1 );
							
				assertEquals( report[0], 10 );
				assertEquals( report[1], 8 );		
		
		
		}
		
		
		
		
	}
}